home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinXP NTP Update.xpl < prev    next >
Text File  |  2002-04-06  |  2KB  |  60 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="2"
  3. "COUNT"="1"
  4. "UIPATH 1"="Network\Network Time Protocol"
  5. "NAME"="NTP Update Interval"
  6. "VERSION"="2.00"
  7. "OSVERSION"="0000011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Interval (min)"
  10. "DESCRIPTION 1"="Specifies update interval for the Network Time Protocol feature included in Windows."
  11. "DESCRIPTION 2"="The default update interval is 10080 minutes (7 days)."
  12. "AUTHOR"="MacGyver aka Habeeb J. Dihu"
  13. "CONTACTURL"="http://www.macgyver.org/"
  14. "COPYRIGHT"="Copyright ⌐ MacGyver aka Habeeb J. Dihu - All Rights Reserved."
  15. "COMMENT 1"="No time like the present. "
  16. "COMMENT 2"="Based on plug-in by Xteq Systems (CptSiskoX)"
  17. "COMMENT 3"="Internet Time Configuration -- see Microsoft KB Q297227.  http://support.microsoft.com/support/kb/articles/Q297/2/27.asp"
  18.  
  19.  
  20.  
  21. sPath="HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval"
  22.  
  23. Sub Plugin_Initialize 
  24.  s=RegReadValue(sPath)
  25.  if IsEmpty(s) then
  26.     Call SetUIElement(1,"")
  27.  else
  28.     If IsNumeric(s)=true then
  29.        l=CLng(s)
  30.        l=l/60   '=minutes
  31.        Call SetUIElement(1,l)
  32.     end if
  33.  end if
  34.  
  35. End Sub
  36.  
  37. Sub Plugin_CheckData(ElementIndex)
  38. End Sub
  39.  
  40. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  41.  s=GetUIElement(1)
  42.  if len(s)=0 then
  43.     if RegValueExists(sPath) then s="10080"
  44.  end if
  45.  
  46.  if IsNumeric(s)=false then
  47.     Call MsgError("Please use a valid numeric value!")
  48.  else
  49.     l=Clng(s)
  50.     l=l*60 'seconds
  51.  
  52.     Call RegWriteValue(sPath,l,2)
  53.     Call Restart()
  54.  end if 
  55.  
  56. End Sub
  57.  
  58. Sub Plugin_Terminate 
  59. End Sub
  60.